/*
 * @Descripttion: 
 * @version: 1.0
 * @Author: Sam
 * @Date: 2022-04-26 20:55:38
 * @LastEditors: Sam
 * @LastEditTime: 2022-05-09 16:42:00
 */

import request from '@/utils/request'

/**
 * 列表
 * @param params
 * @returns {AxiosPromise}
 */
export function list(params) {
  return request({
    url: '/admin/order_index',
    method: 'get',
    params
  })
}

/**
 * 列表
 * @param params
 * @returns {AxiosPromise}
 */
 export function order_log(id) {
    return request({
      url: '/admin/order_log?id='+id,
      method: 'get'
    })
  }

/**
 * 详情
 * @param id
 * @returns {AxiosPromise}
 */
 export function detail(id) {
    return request({
      url: `/admin/order_detail?id=`+id,
      method: 'get',
    })
  }

  /**
 * 删除
 * @param id
 * @returns {AxiosPromise}
 */
export function del(id) {
    return request({
      url: `/admin/banner_delete`,
      method: 'post',
      data:{
        ids:id
      }
    })
  }


  /**
 * 创建
 * @param data
 * @returns {AxiosPromise}
 */
export function create(data) {
    return request({
      url: '/admin/banner_create',
      method: 'post',
      data
    })
  }


      /**
 * 编辑
 * @param data
 * @returns {AxiosPromise}
 */
export function edit(data) {
  return request({
    url: '/admin/order_edit',
    method: 'post',
    data
  })
}

      /**
 * 发货
 * @param data
 * @returns {AxiosPromise}
 */
export function deliver(data) {
    return request({
        url: '/admin/order_deliver',
        method: 'post',
        data
    })
}

      /**
 * 退款
 * @param data
 * @returns {AxiosPromise}
 */
       export function refund_yes(data) {
        return request({
            url: '/admin/order_refundyes',
            method: 'post',
            data:data
        })
    }

      /**
 * 退款拒绝
 * @param data
 * @returns {AxiosPromise}
 */
       export function refund_no(data) {
        return request({
            url: '/admin/order_refundno',
            method: 'post',
            data:data
        })
    }




